<template>
    <div>
        添加角色:
        <van-field label='角色名称' placeholder="请输入角色名称" v-model="form.name"/>
        <van-button @click="add">添加</van-button>

    

    </div>
</template>

<script>
    export default {
        data(){
            return{
                form:{name:''}
            }
        },
        methods:{
            add(){
                this.$axios.post('roleM',this.form)
                .then(res=>{
                     if(res.data.code==200){
                    alert('添加成功')
                }
                })
               
            },
        },
    }
</script>

<style scoped>

</style>